﻿using System;

namespace AutoDb {
	/// <summary>
	/// 
	/// </summary>
	static class SourceFileParserFactory {
		/// <summary>
		/// 
		/// </summary>
		/// <param name="fileType"></param>
		/// <param name="logContext"></param>
		/// <returns></returns>
		public static ISourceFileParser CreateParser(SourceFileType fileType, LogContext logContext) {
			switch (fileType) {
				case SourceFileType.Xml:
					return new XmlSourceFileParser(logContext);
				case SourceFileType.Unknown:
					return new XmlSourceFileParser(logContext);
				default:
					throw new InvalidProgramException();
			}
		}
	} // end of SourceFileParserFactory.
}
